package com.weishu.system.service.impl;

import java.util.List;
import com.weishu.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.weishu.system.mapper.TJrSfLoanDetailMapper;
import com.weishu.system.domain.TJrSfLoanDetail;
import com.weishu.system.service.ITJrSfLoanDetailService;

/**
 * 收房贷申请明细Service业务层处理
 * 
 * @author weishu
 * @date 2021-10-19
 */
@Service
public class TJrSfLoanDetailServiceImpl implements ITJrSfLoanDetailService 
{
    @Autowired
    private TJrSfLoanDetailMapper tJrSfLoanDetailMapper;

    /**
     * 查询收房贷申请明细
     * 
     * @param id 收房贷申请明细ID
     * @return 收房贷申请明细
     */
    @Override
    public TJrSfLoanDetail selectTJrSfLoanDetailById(Long id)
    {
        return tJrSfLoanDetailMapper.selectTJrSfLoanDetailById(id);
    }

    /**
     * 查询收房贷申请明细列表
     * 
     * @param tJrSfLoanDetail 收房贷申请明细
     * @return 收房贷申请明细
     */
    @Override
    public List<TJrSfLoanDetail> selectTJrSfLoanDetailList(TJrSfLoanDetail tJrSfLoanDetail)
    {
        return tJrSfLoanDetailMapper.selectTJrSfLoanDetailList(tJrSfLoanDetail);
    }

    /**
     * 新增收房贷申请明细
     * 
     * @param tJrSfLoanDetail 收房贷申请明细
     * @return 结果
     */
    @Override
    public int insertTJrSfLoanDetail(TJrSfLoanDetail tJrSfLoanDetail)
    {
        tJrSfLoanDetail.setCreateTime(DateUtils.getNowDate());
        return tJrSfLoanDetailMapper.insertTJrSfLoanDetail(tJrSfLoanDetail);
    }

    /**
     * 修改收房贷申请明细
     * 
     * @param tJrSfLoanDetail 收房贷申请明细
     * @return 结果
     */
    @Override
    public int updateTJrSfLoanDetail(TJrSfLoanDetail tJrSfLoanDetail)
    {
        tJrSfLoanDetail.setUpdateTime(DateUtils.getNowDate());
        return tJrSfLoanDetailMapper.updateTJrSfLoanDetail(tJrSfLoanDetail);
    }

    /**
     * 批量删除收房贷申请明细
     * 
     * @param ids 需要删除的收房贷申请明细ID
     * @return 结果
     */
    @Override
    public int deleteTJrSfLoanDetailByIds(Long[] ids)
    {
        return tJrSfLoanDetailMapper.deleteTJrSfLoanDetailByIds(ids);
    }

    /**
     * 删除收房贷申请明细信息
     * 
     * @param id 收房贷申请明细ID
     * @return 结果
     */
    @Override
    public int deleteTJrSfLoanDetailById(Long id)
    {
        return tJrSfLoanDetailMapper.deleteTJrSfLoanDetailById(id);
    }
}
